function getSensorName(primaryKey,testunitno){
    layui.use('table',function(){
        $.ajax({
            url:"http://localhost/consumer/dataListAPI/getAllSelectSensorName",
            data:{
                primaryKey:primaryKey,
                testunitno:testunitno
            },
            type:'get',
            success:function(data){
                var cols = [{field:'acqusitionDate',title: '采集日期'},
                    {field:'acqusitionTime',title: '采集时间'}];
                for (var i=0;i<data.length;i++){
                    var temp = {field:data[i].sensorno,title:data[i].name};
                    cols.push(temp);
                }
                var table = layui.table;
                table.render({
                    elem:'#dataList',
                    url: 'http://localhost:8001/getDataList/2019-04-28 16:12:001', //数据接口
                    page: true, //开启分页
                    toolbar:true,
                    cols:[cols]
                })
                console.log(cols.length)

            }
        });
    })
}